<title>出票管理</title>
<meta name="menu" content="ticket"/>
<meta name="menuItem" content="ticketList"/>
<script type="text/javascript" src="<@c.url value= "/js/jquery/jquery-1.4.2.min.js"/>"></script>
<form name="queryForm" action="${base}/admin/ticket/ticket!ticketList.action" method="get">
     <#assign ticketSupporterArr=stack.findValue("@com.cai310.lottery.ticket.common.TicketSupporter@values()") />
     <select name="ticketSupporter">
		    <option value="">全部出票商</option>
			 <#list ticketSupporterArr as supporter>
			    <option <#if ticketSupporter?? && ticketSupporter==supporter>selected="selected"</#if> value="${supporter}">${supporter.supporterName}</option>
			 </#list>
     </select>
     &nbsp;
          期号：<input name="periodNumber" value="<#if issueNumber??>${issueNumber!}</#if>" type="text" class="header_searchinput" onblur="this.className='header_searchinput'" onfocus="this.className='header_searchclick'" size="15" />&nbsp;
          方案编号： <input name="schemeNumber" value="<#if schemeNumber??>${schemeNumber!}</#if>" type="text" class="header_searchinput" onblur="this.className='header_searchinput'" onfocus="this.className='header_searchclick'" size="15" />
     <#assign lotteryTypeArr=stack.findValue("@com.cai310.lottery.common.Lottery@values()") />
              	<select name="lotteryType" onchange="document.forms['queryForm'].submit();return false;">
					<option value="">全部彩种</option>
					<#list lotteryTypeArr as type>
					<option <#if lotteryType?? && lotteryType==type>selected="selected"</#if> value="${type}">${type.lotteryName}</option>
					</#list>
	 </select>
	 <select name="ticketState" onchange="document.forms['queryForm'].submit();return false;">
	              <option value="">全部</option>
                  <option value="0" <#if ticketState?? && ticketState=="0">selected="selected"</#if>>失败</option>
                  <option value="1" <#if ticketState?? && ticketState=="1">selected="selected"</#if>>成功</option>
      </select>
      <a href="#" onclick="document.forms['queryForm'].submit();return false;"><img src="${base}/styles/adminDefault/images/ico_search.gif" border="0" align="absmiddle"/></a>
</form> 
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#DCDCDC">
    <tr class="trlbrown">
	  <td height="22">拆分方案编号</td>
      <td>所属方案号</td>
      <td>期号</td>
      <td>彩种</td>
      <td>投注方式</td>
      <td>方案金额</td>
      <td>出票状态</td>
      <td>电子票号</td>
       <td>内容</td>
      <td>发票时间</td>
      <td>最后修改时间</td>
      <td>出票商</td>
      <td>错误码</td>
    </tr>
  
    <#if pagination??&& (pagination.result![])?size gt 0>
    	<#list pagination.result as ticket>
    	<#if ticket_index%2==0><#assign trColor="trw" /><#else><#assign trColor="trgray" /></#if>
    	<tr class="${trColor}" onmouseover="this.className='trlbro'" onmouseout="this.className='${trColor}'">
	      <td>${ticket.id}</td>
	      <td><a href="${base}/admin/ticket/ticket!gotoScheme.action?schemeNumber=${ticket.schemeNumber}" target="_blank">${ticket.schemeNumber}</a></td>
	      <td>${ticket.periodNumber}</td>
	      <td>${ticket.lotteryType.lotteryName}</td>
	      <td>${ticket.mode.modeName}</td>
	      <td>${ticket.schemeCost}</td>
	      <td><#if ticket.stateCode?? && ticket.stateCode=="0">委托中
	          <#elseif ticket.stateCode?? && ticket.stateCode=="1">成功
	          <#elseif ticket.stateCode?? && ticket.stateCode=="7">限号
	          <#elseif !ticket.stateCode?? || ticket.stateCode=="">未出票
	          <#else>失败</#if>
	      </td>
	      <td>${ticket.remoteTicketId!}</td>
	      <td>${ticket.content!}</td>
	      <td>
	        <#if ticket.sendTime??>${ticket.sendTime?string('yyyy-MM-dd HH:mm:ss')}</#if>
	      </td>
	      <td>
	          <#if ticket.stateModifyTime??>${ticket.stateModifyTime?string('yyyy-MM-dd HH:mm:ss')}</#if>
	       </td>
	      <td><#if ticket.ticketSupporter??>${ticket.ticketSupporter.supporterName!}</#if></td>
	      <td>${ticket.stateCodeMessage!}</td>
		</tr>
    	</#list>
    <#else> 
	    <tr>
	      <td class="trw" align="center" colspan="8">无记录</td>
	    </tr>
    </#if>
  </table>
   <#import "../../../macro/pagination.ftl" as b />
  <@b.page />
</body>
</html>